# -*- coding: utf-8 -*-

'''eof
name:行业代码
code:HYDM_CQ
tableName:
columnName:
groups:企业业务信息校验
dependencies:TX_CQ_DSJ,EG_DSJ,CQB_DSJ
type:常用指标
datasourceType:在线指标
description:
eof'''


import sys
import json
reload(sys)
sys.setdefaultencoding('utf-8')



def FormatData(tableName):
    try:
        ic = CQB_DSJ.get("data").get(tableName)
        return ic if isinstance(ic, list) else [{}]
    except:
        return [{}]


def is_num(num):
    try:
        float(num)
        return True
    except:
        return False


def getRule04():
    null_type_list = ['', ' ', None, 'null', 'Null', 'NULL', '/', '-', '--']
    try:
        hydm = TX_CQ_DSJ["data"]["syptSwdjxx"][0]["hydm"]
        if hydm not in null_type_list:
            return hydm
        else:
            return -999
    except:
        return -999

result = getRule04()